package com.itheima.HomeWork.Exer;

import java.io.File;

public class Fi06 {
   public static long l=0;
    public static void main(String[] args) {
        File file = new File("E:\\ttt");
        System.out.println(get(file));
    }
    public static long get(File sc){
        File[] ff = sc.listFiles();

        for (File file : ff) {
            if (file.isFile()){
                l+=file.length();
            }else {
                get(file);
            }
        }
        return l;
    }
}
